var curAjaxObject;

var ajaxObject = function (url, obj, callback) {
	this.url = url;
	this.obj = obj;
	this.callback =callback;
	
	curAjaxObject = this;
	this.ajaxPost();
};

ajaxObject.prototype = {
		ajaxPost : function() {
			$.post(this.url, this.obj, this.callBackTemplate, 'json');
		},
		callBackTemplate : function(result) {
			console.log("result.status : " + result.status);
			if(result.status == 'success') {
				if(curAjaxObject.callback != null)  {
					curAjaxObject.callback(result);
				}
			}
			else
				alert('AJAX 데이터 전송!');
		}
};